package sctu.edu.java.year2016.team07.nieying.practice.qianjizhang;

import java.util.Scanner;

/**
 * Created by Administrator on 2016/5/24 0024.
 */
public class CelsiusConverter {
    public double getFahrenheit(double celsius) {
        double fhahrenheit = 1.8 * celsius + 32;
        return fhahrenheit;
    }
    public static void main(String[] args){
         System.out.println("请输入要转换的温度: \n");
        Scanner a=new Scanner(System.in);
        double celsius=a.nextDouble();
        CelsiusConverter converter=new CelsiusConverter();
        double fharenheit=converter.getFahrenheit(celsius);
        System.out.println("输出转换后的温度: "+fharenheit);
    }
}
